import React from 'react'
import ReactDOM from 'react-dom'

// 1. 准备数据
const list = [
  { id: 1, name: '武汉黑马前端64期', salary: 11000 },
  { id: 2, name: '武汉黑马前端66期', salary: 13000 },
  { id: 3, name: '武汉黑马前端68期', salary: 15000 },
]

// 2. 渲染数据
const el = (
  <ul>
    {list.map((item) => (
      <li key={item.id}>
        <h3>班级：{item.name}</h3>
        <p>工资：{item.salary}</p>
      </li>
    ))}
  </ul>
)

ReactDOM.render(el, document.querySelector('#root'))
